Ext.namespace("Nippy.Components.NodeEditors");

Nippy.Components.NodeEditors.AnnotationPage = Ext.extend(Nippy.Components.NodeEditors.Page2, {
	initComponent: function(){
		Ext.apply(this, {
		    labelWidth: 135,
		    frame:true,
		    title: 'Товар ('.concat(this.nodeId,')'),
		    bodyStyle:'padding:5px 5px 0',
		    width: 550,
		    defaultType: 'textfield',
            addOther: true,
		    items: [{
		            fieldLabel: 'Аннотация',
                    height: 300,
		            xtype: 'htmleditor',
		            name: 'Annotation',
		            allowBlank: true,
                    plugins: [new Ext.ux.form.HtmlEditor.Uploader()]
		        }]
		});
		Nippy.Components.NodeEditors.AnnotationPage.superclass.initComponent.apply(this, arguments);
	}
	,saveClick: function(){
		this.getForm().submit({
			url: '/admin/cfg-annotation-page/',
			method: 'PUT',
			scope: this,
			params: {id: this.nodeId},
			failure: this.submitFailure,
			success: function(form, action){
				this.fireEvent('onsaved', this);
			}
		});
	}
});